{% extends 'base2.html' %}
{% block title %}学校类型分布图{% endblock %}
{% block body_part %}
    <div class="row mt-5">
        <div id="main" style="width: 800px; height: 600px; margin: 0 auto"></div>
    </div>

{% endblock %}
{% block script %}
<script type="text/javascript">
var myChart = echarts.init(document.getElementById("main"));
    option = null;
    option = {
        title: {
            text: '学校类型分布',
            left: 'right'
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            data: {{ index | safe }}
        },
        series: [
            {
                name: '访问来源',
                type: 'pie',
                radius: ['30%', '60%'],
                center: ['60%', '50%'],
                data: {{ datas | safe }},
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    myChart.setOption(option);
</script>
<p align="center"><b>接受调剂学校类型排行前三的为：理工类、综合类以及师范类。</b></p>
{% endblock %}